package com.itbac.openfeign.order;

import com.itbac.domain.Order;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author: BacHe
 * @email: 1218585258@qq.com
 * @Date: 2021/4/22 0:06
 */
@FeignClient("service-order")
@RequestMapping("/order")
public interface OrderClient  {
    //使用openfeign远程调用
    //http://127.0.0.1:8091/order/createOrder/2/2/2
    @RequestMapping("/createOrder/{uid}/{pid}/{number}")
    Order createOrder(@PathVariable("uid") Integer uid,
                       @PathVariable("pid") Integer pid,
                       @PathVariable("number")  Integer number);
}
